import Vue from "vue";
import VueRouter from "vue-router";
import MyMain from "@/views/MyMain.vue";
import MyNews from "@/views/MyNews.vue";
import MySports from "@/views/MySports.vue";
import SportsMain from "@/views/SportsMain.vue";
import SportsNei from "@/views/SportsNei.vue";
import SportsWai from "@/views/SportsWai.vue";

Vue.use(VueRouter);

const router = new VueRouter({
  routes: [
    { path: "/main", component: MyMain },
    { path: "/news", component: MyNews },
    {
      path: "/sports",
      component: MySports,
      children: [
        { path: "sportsmain", component: SportsMain },
        { path: "sportsnei", component: SportsNei },
        { path: "sportswai", component: SportsWai },
      ],
    },
  ],
});

export default router;
